<h1>How To Use</h1>
<p>To understand Hapao's test blueprint, please visit the 
<a title="Test Blueprint" class="op-a" href="#">Test Blueprint</a> section.</p>

<h2>Accessing:</h2>
<p>Hapao is accessible from the Pharo menu, by clicking anywhere on the background. Once opened, a list of packages installed in the Pharo image will appear. To select one, just click on it and add it to the list on the right. You can also add a valid expression for the package in the text field in the lower section, click on 'validate' to validate the expression and for the package to be added to the list. A valid expression could be, for example: <code>each beginsWith: 'Mondrian'</code></p>

<h2>Navigation:</h2>
<p>The following navigation options are accessible via contextual menus offered when right-clicking on an element in Hapa'o or in the system browser</p>
<ul>
	<li>Jump from a system browser to the test blueprint. An option to jump to Hapa'o is accessible by right-clicking on a class definition in the system browser (the standard tool to write and browse code in Pharo). The class is selected in the test blueprint.</li>
</ul>
<ul>
	<li>Jump to a class or method definition from Hapa'o. </li>
</ul>
<ul>
	<li>Jump to the definition of unit tests that reference the selected class from Hapa'o.</li>
</ul>
<ul>
	<li>Methods can be removed by right-clicking on it in Hapa'o. To prevent accidents, only non-covered methods can be removed.</li>
</ul>
<p>From Hapao's top menu you have the following options:</p>
<ul>
	<li>Unit tests may be executed within Hapao to immediately see the difference in the blueprint by clicking the 'Run tests'.</li>
</ul>
<ul>
	<li>The 'Info' button displays information about the package itself, like number of clases and methods, and the percent of covered methods.</li>
</ul>
<ul>
	<li>'Open new' opens a new window with the visualization of the current Hapao instance.</li>
</ul>

<h2>Programmatically using Hapa'o:</h2>

<p>A number of facilities are provided to programmatically assess the coverage. This is useful when one wants to simply use the profiling information or to automatize the reporting. </p>
<p>The following expression profiles the execution of the unit tests of all the packages that constitute Mondrian:</p>
<pre> profile := HapaoTestCoverage runTestsForPackagesMatching: 'Mondrian\*'</pre>
<p>The coverage for each class and methods is accessible using accessors:</p>
<pre> (profile &gt;&gt; #MOGraphElement) coverage  "=&gt; 84.69%".
 
 (profile &gt;&gt; #MOGraphElement &gt;&gt; #absoluteBounds) coverage  "=&gt; 100%"</pre>
 <p>The test blueprint is opened with:</p>
 <pre> profile visualize</pre>
